const typeDict = [
  {
    label: '功能异常',
    value: '1',
  },
  {
    label: '产品建议',
    value: '2',
  },
  {
    label: '其他问题',
    value: '3',
  },
];

export const tableOption = {
  ...window.$crudMixins.tableOptions,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  menuWidth: 120,
  viewBtn: false,
  searchLabelWidth: 120,
  viewTitle: '查看详情',
  column: [
    {
      label: '用户昵称',
      prop: 'userNickname',
      width: 160,
    },
    {
      label: '用户ID',
      prop: 'userId',
      width: 160,
      search: true,
    },
    {
      label: '用户手机号',
      prop: 'userPhone',
      width: 160,
      search: true,
    },
    {
      label: '问题类型',
      prop: 'type',
      width: 160,
      type: 'select',
      dicData: typeDict,
      search: true,
    },
    {
      label: '问题描述',
      prop: 'detail',
    },
    {
      label: '联系方式',
      prop: 'contact',
      width: 160,
    },
    {
      label: '提交时间',
      prop: 'createTime',
    },
  ],
};

export const detailOption = {
  ...window.$crudMixins.tableOptions,
  detail: true,
  column: [
    {
      label: '用户昵称',
      prop: 'userNickname',
    },
    {
      label: '用户手机号',
      prop: 'userPhone',
    },
    {
      label: '用户ID',
      prop: 'userId',
    },
    {
      label: '问题类型',
      prop: 'type',
      type: 'select',
      dicData: typeDict,
    },
    {
      label: '联系方式',
      prop: 'contact',
    },
  ],
  group: [
    {
      label: '详细描述',
      prop: 'group1',
      column: [
        {
          labelWidth: 0,
          prop: 'detail',
          slot: true,
        },
      ],
    },
    {
      label: '问题图片/视频',
      prop: 'group2',
      column: [
        {
          labelWidth: 0,
          label: '',
          span: 24,
          prop: 'attachment',
          slot: true,
        },
      ],
    },
  ],
};
